package com.netty.dubborpc.customer;

import com.netty.dubborpc.netty.NettyClient;
import com.netty.dubborpc.publicinterface.HelloServer;

public class MyClientBootstrap {

    public static final String providerName = "HelloService#hello#";

    public static void main(String[] args) throws Exception {
        NettyClient nettyClient = new NettyClient();
        HelloServer helloServer = (HelloServer) nettyClient.getBean(HelloServer.class, providerName);
        while (true) {
            Thread.sleep(2*1000);
            String res = helloServer.hello("你好! netty dubbo ~");
            System.out.println("调用的结果 res= " + res);
        }
    }
}
